package com.smart.upms.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 日志表
 * </p>
 *
 * @author guxiaobai
 * @since 2018-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 日志类型
     */
    private Integer logType;

    /**
     * 日志标题
     */
    private String title;

    /**
     * 服务ID
     */
    private String serviceId;

    /**
     * 操作IP地址
     */
    private String remoteAddr;

    /**
     * 用户代理
     */
    private String userAgent;

    /**
     * 请求URI
     */
    private String requestUri;

    /**
     * 操作方式
     */
    private String method;

    /**
     * 操作提交的数据
     */
    private String params;

    /**
     * 执行时间
     */
    private Integer time;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 异常信息
     */
    private String exception;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;


    public static final String ID = "id";

    public static final String LOG_TYPE = "log_type";

    public static final String TITLE = "title";

    public static final String SERVICE_ID = "service_id";

    public static final String REMOTE_ADDR = "remote_addr";

    public static final String USER_AGENT = "user_agent";

    public static final String REQUEST_URI = "request_uri";

    public static final String METHOD = "method";

    public static final String PARAMS = "params";

    public static final String TIME = "time";

    public static final String CREATE_BY = "create_by";

    public static final String EXCEPTION = "exception";

    public static final String CREATE_TIME = "create_time";

}
